/*
 * (C) 2007-2010 Taobao Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *
 *
 * Version: 0.1: cloudbase.h,v 0.1 2011/08/27 09:15:39 chuanhui Exp $
 *
 * Authors:
 *   chuanhui <rizhao.ych@taobao.com>
 *     - some work details if you want
 *
 */
#ifndef __CLOUDBASE_CLOUDBASE_H__
#define __CLOUDBASE_CLOUDBASE_H__

#include "leveldb/db.h"

namespace cloudbase {

class CloudBase {
private:
  CloudBase();
  ~CloudBase();

public:
  // Gets global instance.
  static CloudBase* getInstance();

  int init(const std::string& dbPath);

  // Gets leveldb instance.
  leveldb::DB* getDBInstance();

private:
  leveldb::DB* dbInstance_;
  std::string path_;
};

}


#endif //__CLOUDBASE_H__

